package com.cndcare.msc.netty.service.impl;

import com.cndcare.msc.cloud.base.common.LayuiPageInfo;
import com.cndcare.msc.netty.bean.DangerLogBean;
import com.cndcare.msc.netty.dao.mapper.DangerLogMapper;
import com.cndcare.msc.netty.service.DangerLogService;
import com.cndcare.msc.netty.vo.SearchVo;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("dangerLogService")
public class DangerLogServiceImpl implements DangerLogService {

    @Autowired
    private DangerLogMapper dangerLogMapper;

    @Override
    public PageInfo<DangerLogBean> listDangerLogByParams(Integer pn, Integer pageSize, SearchVo searchVo) {
        PageHelper.startPage(pn, pageSize);

        List<DangerLogBean> dangerLogBeanList = dangerLogMapper.listDangerLogByParams(searchVo);

        return new LayuiPageInfo<>(dangerLogBeanList);
    }
}
